import createSvgIcon from './svg-icon'
import createCompression from './compression'
import react from '@vitejs/plugin-react'

function createVitePlugins(viteEnv, isBuild = false) {
    const vitePlugins = [react()]
    vitePlugins.push(createSvgIcon(isBuild))
	isBuild && vitePlugins.push(...createCompression(viteEnv))
    return vitePlugins
}

export default createVitePlugins
